home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Tools / Preditor 2.0 / Macros / SumScores < prev    next >
Encoding:
Text File  |  1991-07-22  |  559 b   |  30 lines  |  [TEXT/TCEd]

  1. #
  2. #    SumScores
  3. #
  4. #    Last Modified: Friday, June 27, 1991 at 11:46 PM
  5. #    Macro Files for Preditor
  6. #
  7. #    Example macro the sums up scores for a list of people.
  8. #    This list is in the file "Score_List"
  9. #
  10. #    © Copyright Evatac Software  1988-1991
  11. #    All rights reserved
  12. #
  13.  
  14. total = 0     # clear total count
  15. x = 1          # line number count
  16.  
  17. Open(~Preditor + ":Macros:Score_List", "ar")
  18. Target("Score_List")
  19.  
  20. While (Valid(%x))
  21.     Select([%x]≤0)
  22.     If (!search("p", "[0-9][0-9]*$", NULL) ) ; break; end
  23.         
  24.     total = total + Select(§)
  25.     x = x + 1
  26. End
  27.  
  28. Alert("s", "Total = " + total)
  29.  
  30.